package com.service.impl;

import com.entity.User;
import com.mapper.UserMapper;
import com.service.UserService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;


@Service
public class UserSericeImpl implements UserService {

    @Autowired
    private UserMapper userMapper;

    @Override
    public List<User> listUsers() {
        return userMapper.listUsers();
    }

    @Override
    public Boolean addUser(User user) {
        return userMapper.addUser(user) > 0 ? true:false;
    }

    @Override
    public Boolean deleteUser(Integer id) {
        return userMapper.deleteUser(id) > 0 ? true:false;
    }
}
